/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hoja4;

/**
 *
 * @param <E> 
 * @author Nery Giron, Adrian Martinez, Maria Fernanda Martinez, Darwin Rivas
 */

public class Singleton <E> {
    /**
     * 
     */
    public static Singleton instancia = null;
    private Stack<String> stack;
 
    private Singleton(){
        this.stack = null;
    }
         
    /**
     * 
     * @return
     */
    public synchronized static Singleton getInstancia(){
        if (instancia == null) instancia = new Singleton();
        return instancia;
    }
    
    /**
     * 
     * @param a
     */
    public void iniciar(Stack<String> a){
        this.stack=a;
    }
    /**
     * 
     * @return
     */
    public Stack<String> obtener(){
        return this.stack;
    }
}
